>> TGS_phase_analysis('Cr_single_crystal-2019-06-27-06.40um-75degrees-POS-1.txt','Cr_single_crystal-2019-06-27-06.40um-75degrees-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =     0.02129  (0.02061, 0.02196)
       k =   2.785e-05  (2.728e-05, 2.841e-05)
       beta =   7.879e-07  (-4.629e-07, 2.039e-06)
       B =    0.008838  (0.008721, 0.008956)
       p =      -2.119  (-2.129, -2.109)
       t =   2.444e-08  (2.395e-08, 2.493e-08)
       D =   0.0002781  (0.0002522, 0.000304)
     Problem parameters:
       q =   9.817e+05
       start_time =       7e-10
       peak_freq =   5.524e+08

ans =

   5.5235e+08